#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

struct Fraction {
    int top;//分子numerator
    int bottom;//分母denominator
};

int gcd(int a, int b) {
    if (b == 0)return a;
    return gcd(b, a % b);
}

void simplify(Fraction &f) {
    int g = gcd(f.top, f.bottom);
    f.top /= g;
    f.bottom /= g;

}

void input(Fraction &f) {
    cin >> f.top >> f.bottom;
    simplify(f);
}

void output(Fraction f) {
    printf("%d/%d", f.top, f.bottom);
}


Fraction add(Fraction a, Fraction b) {
    Fraction c = {0, 1};
    c.top = a.top * b.bottom + a.bottom * b.top;
    c.bottom = a.bottom * b.bottom;
    simplify(c);
    return c;
}

int main() {
    Fraction a, b, c;
    input(a);
    input(b);
    c = add(a, b);
    output(c);
    return 0;
}